#include<iostream>
using namespace std;
#include<cmath>

#include"library.h"

int main(){

	int i,j,n=3;
        double A[9] = { 0.575155, 0.878075, 0.939033, 0.878075, 0.445565, 0.99726, 0.939033, 0.99726, 0.957276 };
	double *z = new double [n];

	jacobi(n, A, z);
	
	cout<<"eigenvalues: "; for(i=0;i<n;i++)cout<<z[i]<<","; cout<<endl;
	cout<<"eigen-vectors:"<<endl;
	for(i=0;i<n;i++){
		cout<<" number "<<i<<": \t";
		for(j=0;j<n;j++)cout<<A[i*n+j]<<","; cout<<endl;
	}

	return 0;
}
